﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    assembly="SAKS.Models"
    namespace="SAKS.Models">
  <class name="Membership">
    <id name="Id" column="UserId">
      <generator class="foreign">
        <param name="property">User</param>
      </generator>
    </id>
    <version name="Version" />
    <property name="Password" not-null="true"/>  
    <property name="PasswordFormat" not-null="true"/>
    <property name="PasswordSalt" />

    <property name="MobilePIN" />
    <property name="Email" not-null="true"/>
    <property name="LoweredEmail" not-null="true"/>
    
    <property name="PasswordQuestion" />
    <property name="PasswordAnswer" />
    <property name="IsApproved" />
    <property name="IsLockedOut" />
    
    <property name="CreateDate" not-null="true"/>
    <property name="LastLoginDate" not-null="true"/>
    <property name="LastPasswordChangedDate" not-null="true"/>
    <property name="LastLockoutDate" />
    
    <property name="FailedPasswordAttemptCount" />
    <property name="FailedPasswordAttemptWindowStart" />
    <property name="FailedPasswordAnswerAttemptCount" />
    <property name="FailedPasswordAnswerAttemptWindowStart" />
    
    <property name="Comment" />
    
    <one-to-one name="User" class="SAKS.Models.User" constrained="true" cascade="all" lazy="proxy"/>
  </class>

</hibernate-mapping>